In this next tutorial, we'll discuss some of the power that is associated
with Black Boxes in thinkingParticles. It is very important
that you understand how to create Black Boxes as they make life much easier
when you start to use them. Not only will they be reusable for many particle
situations, but with them you can achieve better particle effects in a
shorter span of time.
The obvious question is: what is a Black Box?
The simplest definition of a Black Box is that it is nothing more than
a standard DynamicSet saved to your hard disk so it can be re-used.
More specifically, Black Boxes (at least good ones that you want to share
with others or re-purpose) exist as collections of scene independent conditions
and operators. These saved DynamicSets can then be used in other scenes
without any further adjustments and become drag-and-drop in the same way
you do with the other thinkingParticles operators. When you create your
own Black Boxes you need to keep in mind that everything should
be scene independent as it doesn't make sense to create Black Boxes that
include Particle Group names or other scene-specific data.
So without further introduction, you are going to create your very own
Black Box that mimics a standard 3ds Max Spray particle system.
Load the scene file called BlackBox Start.max from your C:\Documents and Settings\All Users\Documents\cebas\Sample Scenes Shared\thinkingParticles\Tutorials folder.

When you play back this scene you’ll see that the particles get blown away.
You won't change this effect - you'll simply use this scene as the starting
point for your Black Box creation.
Select the thinkingParticles node (the little X) in the 3ds Max viewports, then go to the Modify Command Panel.
As you can see, the Wind space warp is bound to the thinkingParticles
node.
Go down in the modifier stack and highlight Thinking.
Click onto the Properties button to open the thinkingParticles user interface.
To get a quick overview of the particle setup, select the Master DynamicSet
from within the DynamicSet Tree View on the left-hand side. In the main
wire setup dialog you'll see two DynamicSets (called create
and Space Warp respectively).

The first thing you need to do to create your Black Box is to build a new
DynamicSet.
With the Master DynamicSet still selected, click Create to create a new DynamicSet entry.
Rename the DynamicSet to Spray100.
You'll only need this DynamicSet temporarily. Once you build your Black Box, you will be able to delete it from the DynamicSet list.
Select the Spray100 DynamicSet to bring up the empty DynamicSet view in the main Wire Setup View.
Now, let’s start adding some conditions and operators.
From the Conditions rollout, add an Always True Condition.
Next, from the Operators / Generators section, add a Position Born operator to the Spray100 DynamicSet view.
Finally, from the Helpers / Standard rollout, add a Point3 Helper.

Operators added to Spray100 DynamicSet
Since this is being designed to be a Black Box, none of the operators or
conditions will use any scene dependent data such as Group names or attached
objects. This is essential for a Black Box to work properly under all
possible circumstances. Now you'll connect up the various input and output
data streams.
First connect the Output output
data stream from the Always True Condition to the
On input data stream for the Position Born
operator.
This connection is no longer needed, since thinkingParticles.5 all operators assume by default an "On" value on their activation input.
This tells the Position Born operator to continually birth particles.
Next, connect the Vector output data stream from the Point3 Helper to the Position input data stream for the Position Born operator.
The Vector Helper is responsible for piping in the positional data needed
by the Position Born operator so that you can set where the particles
are emitted from.

All operators connected
Select the Point3 Helper and adjust the X, Y and Z-Values all to 1.0.
What this does is set the position of the Spray particle system to XYZ
= 1, 1, 1 in World coordinates.
Finally, select the Position Born object and in the rollout, adjust the Particle Count value to 100. (hence the DynamicSet name of Spray100)
Now your Spray100 particle system is ready to be saved as a Black Box.
Every DynamicSet has its own main control bar at the very top of the Wire
Setup View. The Save button within it stores the complete
DynamicSet to the hard drive as a separate file. All DynamicSets are stored
in a special directory (normally your C:\Documents and Settings\All Users\Documents\cebas\3dsmax9toX\thinkingParticles_3\BlackBox
folder), and once saved, it will immediately show up as a Black Box in
the Black Box menu.
Click the Save button in the main control bar at the top of the Spray100 DynamicSet.
A standard Windows file dialog shows up.

You can now type in a new filename or use the suggested Spray100.thi filename. In this case, keep the default settings and simply hit Save. Be certain that the folder the .THI file is saved into is the \3dsmax\cebas\BlackBox folder - otherwise, the file will not be visible.
Be aware that all Black Boxes you save must be
stored in the special C:\Documents and Settings\All Users\Documents\cebas\3dsmax9toX
\thinkingParticles_3\BlackBox folder in order to show up in the thinkingParticles
dialog. Also, by default, the Black Box save dialog will use the name
of the DynamicSet as the default name for the new Black Box, so make
sure you use a relevant name, or that you type in a recognizable name
when the save dialog comes up.
You now have a Black Box ready for use. Let's check it out.
Reset your copy of 3ds Max do not save changes to the original scene file.
Don't panic about the reset - you've saved the simple Spray particle
system you want to re-use.
In the new scene, create a new thinkingParticles icon and open up the dialog.
Next, in the Particle Group Tree View, create a new particle group. Leave the name unchanged.
Finally, create a new DynamicSet in the DynamicSet Tree View and call it BB_Spray
Now comes the fun part - adding in your saved Black Box.
With the BB_Spray DynamicSet selected, click on the BlackBox icon in the thinkingParticles Create panel.

You now see a new entry named Spray100 - the Black Box you just created!
Click on Spray100 and add it as you would any other operator to the BB_Spray DynamicSet.
When you do, something interesting happens; you get two Wire Setup View
window stacked on top of one another.

The Black Box from within the Wire Setup View
In the image above, you can see that the upper BB_Spray DynamicSet now
contains a single operator: the Black Box Spray100. You
can tell because the Spray100 operator is prefixed by a D:
in the name (which stands for DynamicSet), and it also offers no direct
input or output data streams.
Beneath it are the contents of the Spray100 Black Box. The hierarchy of
this configuration in the DynamicSet Tree View shows that the Spray100
DynamicSet is actually now a Sub-DynamicSet of the BB_Spray DynamicSet.

Whenever you choose the BB_Spray DynamicSet, you will always be shown the
Spray100 Black Box contents as well.
Play the animation back in the Perspective viewport.
The animation you originally created is now here in this fresh scene.
What makes this special is that all of the original Spray100 Black Box
operators are available for further editing, so that you can continue
to customize or refine the Black Box effect as it relates to your current
project. Since the Position Born operator's rollouts are accessible through
the BB_Spray DynamicSet, you can send the particles it creates into any
group that is specific to your current scene.
As you can see, Black Boxes are a very powerful option for keeping things
organized. Having the ability to save and re-use scene independent DynamicSets
is a major key to doing advanced particle system effects with thinkingParticles
as well as reducing the amount of time it takes to set up these effects.